<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?php
    header("Content-type: application/octet-stream");
    header("Content-Disposition: attachment; filename=Buku_Santri_Periode_".$nama_periode.".xls");
    header("Pragma: no-cache");
    header("Expires: 0");
?>


<style type="text/css">
<!--
body,td,th {
	font-size: 13px;
	font-family:Arial,Helvetica;
	vertical-align:middle;
}
.judul{	
	font-size:20px;
	font-weight: bold;
	text-align:center;
} 

.subjudul{	
	font-size:14px;
	text-align:center;
} 

.headertabel {
	font-size:15px;
	text-align:center;
	background-color:#BFBFBF;
	border-width: 1px;
	border-style:solid;
}

.isi_tabel
{
    border-width: 1px 1px 1px 1px;
	border-style:solid;
	height:25px;
}

-->
</style>



<table border="1">
<tr>
	<td colspan="10" class="judul">Buku Santri Periode <?=$nama_periode?></td>
</tr>
<tr>
	<td colspan="10" align="center"><b>Laki-laki</b></td>
</tr>
<tr align="center">
	<td>No.</td>
	<td>No Munakosah</td>
	<td>Nama Santri</td>
	<td>Telepon Santri</td>
	<td>Alamat</td>
	<td>Nama Ustad</td>
	<td>Hari</td>
	<td>Jam</td>
	<td>Materi</td>
	<td>Tempat</td>
</tr>
<?
	$no = 1;
	foreach ($data_buku_l->result() as $row){
		echo'<tr>
				<td>'.$no.'.</td>
				<td>'.$row->munakosah.'</td>
				<td>'.$row->nama_santri.'</td>
				<td>\''.$row->telpon_santri.'</td>
				<td>'.$row->asal_santri.'</td>
				<td>'.$row->nama_ustad.'</td>
				<td>'.$row->hari.'</td>
				<td>\''.$row->jam.'</td>
				<td>'.$row->NAMA_KELAS.'</td>
				<td>'.$row->ruang_kelas.'</td>
			</tr>'
		;
		$no++;
	}
?>




<tr>
	<td colspan="10">&nbsp;</td>
</tr>
<tr>
	<td colspan="10">&nbsp;</td>
</tr>
<tr>
	<td colspan="10" align="center"><b>Perempuan</b></td>
</tr>
<tr align="center">
	<td>No.</td>
	<td>No Munakosah</td>
	<td>Nama Santri</td>
	<td>Telepon Santri</td>
	<td>Alamat</td>
	<td>Nama Ustad</td>
	<td>Hari</td>
	<td>Jam</td>
	<td>Materi</td>
	<td>Tempat</td>
</tr>
<?
	$no_p = 1;
	foreach ($data_buku_p->result() as $row){
		echo'<tr>
				<td>'.$no_p.'.</td>
				<td>'.$row->munakosah.'</td>
				<td>'.$row->nama_santri.'</td>
				<td>"'.$row->telpon_santri.'"</td>
				<td>'.$row->asal_santri.'</td>
				<td>'.$row->nama_ustad.'</td>
				<td>'.$row->hari.'</td>
				<td>"'.$row->jam.'"</td>
				<td>'.$row->NAMA_KELAS.'</td>
				<td>'.$row->ruang_kelas.'</td>
			</tr>'
		;
		$no_p++;
	}
?>
</table>